﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.6
// Code is generated on: 2012年10月23日 21:56:48
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace SaleDiscount.Data.HelperClasses
{
	
	// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
	// __LLBLGENPRO_USER_CODE_REGION_END
	
	/// <summary>
	/// Singleton implementation of the FieldInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.
	/// </summary>
	/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the FieldInfoProviderBase class is threadsafe.</remarks>
	internal sealed class FieldInfoProviderSingleton
	{
		#region Class Member Declarations
		private static readonly IFieldInfoProvider _providerInstance = new FieldInfoProviderCore();
		#endregion
		
		/// <summary>private ctor to prevent instances of this class.</summary>
		private FieldInfoProviderSingleton()
		{
		}

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static FieldInfoProviderSingleton()
		{
		}

		/// <summary>Gets the singleton instance of the FieldInfoProviderCore</summary>
		/// <returns>Instance of the FieldInfoProvider.</returns>
		public static IFieldInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the FieldInfoProvider. Used by singleton wrapper.</summary>
	internal class FieldInfoProviderCore : FieldInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="FieldInfoProviderCore"/> class.</summary>
		internal FieldInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores.</summary>
		private void Init()
		{
			base.InitClass( (3 + 0));
			InitEbayUserTokenEntityInfos();
			InitSaleEntityInfos();
			InitSaleListingsEntityInfos();

			base.ConstructElementFieldStructures(InheritanceInfoProviderSingleton.GetInstance());
		}

		/// <summary>Inits EbayUserTokenEntity's FieldInfo objects</summary>
		private void InitEbayUserTokenEntityInfos()
		{
			base.AddElementFieldInfo("EbayUserTokenEntity", "Id", typeof(System.Int32), true, false, true, false,  (int)EbayUserTokenFieldIndex.Id, 0, 0, 10);
			base.AddElementFieldInfo("EbayUserTokenEntity", "UserId", typeof(System.String), false, false, false, true,  (int)EbayUserTokenFieldIndex.UserId, 50, 0, 0);
			base.AddElementFieldInfo("EbayUserTokenEntity", "EBayUserId", typeof(System.String), false, false, false, false,  (int)EbayUserTokenFieldIndex.EBayUserId, 50, 0, 0);
			base.AddElementFieldInfo("EbayUserTokenEntity", "Token", typeof(System.String), false, false, false, false,  (int)EbayUserTokenFieldIndex.Token, 2147483647, 0, 0);
			base.AddElementFieldInfo("EbayUserTokenEntity", "CreatedDate", typeof(System.DateTime), false, false, false, false,  (int)EbayUserTokenFieldIndex.CreatedDate, 0, 0, 0);
			base.AddElementFieldInfo("EbayUserTokenEntity", "UpdatedDate", typeof(System.DateTime), false, false, false, false,  (int)EbayUserTokenFieldIndex.UpdatedDate, 0, 0, 0);
			base.AddElementFieldInfo("EbayUserTokenEntity", "TokenExpirationDate", typeof(Nullable<System.DateTime>), false, false, false, true,  (int)EbayUserTokenFieldIndex.TokenExpirationDate, 0, 0, 0);
			base.AddElementFieldInfo("EbayUserTokenEntity", "IsActive", typeof(Nullable<System.Boolean>), false, false, false, true,  (int)EbayUserTokenFieldIndex.IsActive, 0, 0, 0);
		}
		/// <summary>Inits SaleEntity's FieldInfo objects</summary>
		private void InitSaleEntityInfos()
		{
			base.AddElementFieldInfo("SaleEntity", "Id", typeof(System.Int32), true, false, true, false,  (int)SaleFieldIndex.Id, 0, 0, 10);
			base.AddElementFieldInfo("SaleEntity", "EBayUserTokenId", typeof(System.Int32), false, true, false, false,  (int)SaleFieldIndex.EBayUserTokenId, 0, 0, 10);
			base.AddElementFieldInfo("SaleEntity", "SaleName", typeof(System.String), false, false, false, false,  (int)SaleFieldIndex.SaleName, 50, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "StartDate", typeof(System.DateTime), false, false, false, false,  (int)SaleFieldIndex.StartDate, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "EndDate", typeof(System.DateTime), false, false, false, false,  (int)SaleFieldIndex.EndDate, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "IsAuctionExcluded", typeof(System.Boolean), false, false, false, false,  (int)SaleFieldIndex.IsAuctionExcluded, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "DiscountRatio", typeof(System.Decimal), false, false, false, false,  (int)SaleFieldIndex.DiscountRatio, 0, 2, 18);
			base.AddElementFieldInfo("SaleEntity", "DiscountType", typeof(System.Int16), false, false, false, false,  (int)SaleFieldIndex.DiscountType, 0, 0, 5);
			base.AddElementFieldInfo("SaleEntity", "IsFreeShipping", typeof(System.Boolean), false, false, false, false,  (int)SaleFieldIndex.IsFreeShipping, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "AllAuctionItems", typeof(System.Boolean), false, false, false, false,  (int)SaleFieldIndex.AllAuctionItems, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "AllFixedPriceItems", typeof(System.Boolean), false, false, false, false,  (int)SaleFieldIndex.AllFixedPriceItems, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "AllStoreInventoryItems", typeof(System.Boolean), false, false, false, false,  (int)SaleFieldIndex.AllStoreInventoryItems, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "CategoryId", typeof(Nullable<System.Int64>), false, false, false, true,  (int)SaleFieldIndex.CategoryId, 0, 0, 19);
			base.AddElementFieldInfo("SaleEntity", "CreatedDate", typeof(System.DateTime), false, false, false, false,  (int)SaleFieldIndex.CreatedDate, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "UpdatedDate", typeof(System.DateTime), false, false, false, false,  (int)SaleFieldIndex.UpdatedDate, 0, 0, 0);
			base.AddElementFieldInfo("SaleEntity", "StoreCatetoryId", typeof(Nullable<System.Int64>), false, false, false, true,  (int)SaleFieldIndex.StoreCatetoryId, 0, 0, 19);
			base.AddElementFieldInfo("SaleEntity", "PromotionSaleId", typeof(Nullable<System.Int64>), false, false, false, true,  (int)SaleFieldIndex.PromotionSaleId, 0, 0, 19);
			base.AddElementFieldInfo("SaleEntity", "Status", typeof(System.String), false, false, false, true,  (int)SaleFieldIndex.Status, 50, 0, 0);
		}
		/// <summary>Inits SaleListingsEntity's FieldInfo objects</summary>
		private void InitSaleListingsEntityInfos()
		{
			base.AddElementFieldInfo("SaleListingsEntity", "Id", typeof(System.Int64), true, false, true, false,  (int)SaleListingsFieldIndex.Id, 0, 0, 19);
			base.AddElementFieldInfo("SaleListingsEntity", "SaleId", typeof(Nullable<System.Int32>), false, true, false, true,  (int)SaleListingsFieldIndex.SaleId, 0, 0, 10);
			base.AddElementFieldInfo("SaleListingsEntity", "ItemId", typeof(System.String), false, false, false, false,  (int)SaleListingsFieldIndex.ItemId, 50, 0, 0);
		}
		
	}
}




